//
//  GlobalSetting.h
//  SquashSpark
//
//  Created by Coollang on 2017/10/26.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#ifndef GlobalSetting_h
#define GlobalSetting_h

#import "SquashEnum.h"
#import "Common.h"
#import "UIColorDefine.h"
#import "YFUIHelper.h"

#pragma mark - 全局设置
//NETWORK_ENVIRONMENT:0是生产环境，1是测试环境
#define ENVIRONMENT 0
#if ENVIRONMENT == 0
#define kBaseUrl @"http://squash.coollang.com"
#elif ENVIRONMENT == 1
#define kBaseUrl @"http://mlf.f3322.net:8090"
#endif

// 当前时间戳
#define kCurrentDateTime [[NSDate date] timeIntervalSince1970]


// 打印
#ifdef DEBUG
#   define YFLog(fmt, ...) {NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);}
#else
#   define YFLog(...)
#endif


#define ISIOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) // IOS8的系统
#define ISIOS9 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0) // IOS7的系统
#define ISIOS11 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11.0) // IOS8的系统


#define kMaxSpeed ([YFUserDefaults generalMetricSystemUnit] ? 300.0:200.0)

#define kMaxPower 40.0
#define kMaxSwingTime 2000.0


/**是否过滤早于账号创建日期的数据
 1：过滤
 0：不过滤
 */
#define         kFiltEarlyData      1



#endif /* GlobalSetting_h */

